import request from '@/utils/request.js'

// 常量
const api_name = '/order/admin/order'

export default {
    getOrderStatusList() {
        return request({
            url: `${api_name}/getOrderStatusList`,
            method: 'get'
        })
    },
    getOrderPage(params) {
        return request({
            url: `${api_name}/getOrderPage`,
            method: 'get',
            params: params
        })
    },
    getOrderDetailsById(id) {
        return request({
            url: `${api_name}/getOrderDetailsById/${id}`,
            method: 'get'
        })
    },
    orderDelivery(data) {
        return request({
            url: `${api_name}/orderDelivery`,
            method: 'post',
            data: data
        })
    },
    getDeliveryTraceListById(id) {
        return request({
            url: `${api_name}/getDeliveryTraceListById/${id}`,
            method: 'get'
        })
    },
    closeOrder(data) {
        return request({
            url: `${api_name}/closeOrder`,
            method: 'post',
            data: data
        })
    }
}
